const http = uni.$u.http;

// 登录
export const getCode = (params, config = {}) => http.post('user/get_openid', params, config)
export const UserInfo = (params, config = {}) => http.post('user/xcx_login', params, config)

// 首页
export const menuArr = (data) => http.get('index/index_btn', data)
//经纬度获取城市
export const getCity = (params, config = {}) => http.post('common/get_address', params, config)  
export const banner = (data) => http.get("index/banner", data); //banner
//首页工作人员展示
export const indexWork = (params, config = {}) =>
  http.post("index/work_list", params, config);
//首页找工作
export const indexFindWork = (params, config = {}) =>
  http.post("index/job_list", params, config);


// 分类
export const classRight = (params, config = {}) =>
  http.post("jf_cat/cat2", params, config);
export const classLeft = (data) => http.get("jf_cat/cat1", data);
// export const classRight = (data) => http.get("jf_cat/cat2/cat1_id=?", data);
export const joinIn = (params, config = {}) =>
  http.post("common/join_in", params, config);


// 商品详情
export const goodsDetail = (params, config = {}) =>
  http.post("goods/detail", params, config);
//商品规格
export const goodsSpec = (params, config = {}) =>
  http.post("goods/gg_lists", params, config);
//规格数量
export const goodsSpecNum = (params, config = {}) =>
  http.post("goods/gg_num", params, config);
//备注选择
export const goodsRemark = (params, config = {}) =>
  http.post("goods/remark", params, config);
//支付
export const goPay = (params, config = {}) =>
  http.post("pay/jf_pay", params, config);
//提交评价
export const subEvaluate = (params, config = {}) =>
  http.post("goods/comment", params, config);
//商品评价
export const storeEval = (params, config = {}) =>
  http.post("goods/comment_list", params, config);	
//商家列表
export const storeList = (params, config = {}) =>
  http.post("common/store_list", params, config);	
//协会列表
export const xiehuiList = (params, config = {}) =>
  http.post("common/xiehui_list", params, config);	
//协会详情
export const xiehuiDetail = (params, config = {}) =>
  http.post("common/xiehui_detail", params, config);	
	
//获取保姆信息
export const getNannyInfo = (params, config = {}) =>
  http.post("common/nanny_option1", params, config);
export const getNannyInfoS = (params, config = {}) =>
  http.post("common/nanny_option2", params, config);
export const getNannyInfoT = (params, config = {}) =>
  http.post("common/nanny_option3", params, config);
//保姆服务地址城市信息
export const getCityInfo = (params, config = {}) =>
  http.post("common/nanny_area_option1", params, config);
export const getStreetInfo = (params, config = {}) =>
  http.post("common/nanny_area_option2", params, config);
//提交保姆信息
export const submitAuntInfo = (params, config = {}) =>
  http.post("common/submit_nanny_info", params, config);
//提交养老护理信息
export const submitOldInfo = (params, config = {}) =>
  http.post("common/submit_elderly_care_info", params, config);
//员工
//筛选员工
export const getWorkerInfo = (params, config = {}) =>
  http.post("work/list", params, config);
//详细资料
export const getWorkerDetail = (params, config = {}) =>
  http.post("work/ziliao", params, config);
	//自我介绍
export const mineInfo = (params, config = {}) =>
  http.post("work/introduction", params, config);
//客户评价
export const userEval = (params, config = {}) =>
  http.post("work/evaluate", params, config);
//工作照片
export const workImages = (params, config = {}) =>
  http.post("work/work_images", params, config);
//资格证照片
export const qualImages = (params, config = {}) =>
  http.post("work/qualification_images", params, config);



//商场
//商城分类
export const storeClassLeft = (params, config = {}) =>
  http.post("store/cat1", params, config);
export const storeClassRight = (params, config = {}) =>
  http.post("store/cat2", params, config);
//商城列表
export const getStorelist = (params, config = {}) =>
  http.post("store/list", params, config);
//商品信息
export const getProductInfo = (params, config = {}) =>
  http.post("store/detail", params, config);
//生产订单
export const goProductOrder = (params, config = {}) =>
  http.post("store/pay", params, config);
//商城订单
export const storeOrder = (params, config = {}) =>
  http.post("store/order_list", params, config);
export const storeOrderDetail = (params, config = {}) =>
  http.post("store/order_detail", params, config);	
//推荐商品
export const storeRecomDetail = (params, config = {}) =>
  http.post("store/recommend_list", params, config);	
	
	
//拼团
export const groupBooking = (params, config = {}) =>
  http.post("group_purchase/list", params, config);
//拼团详情
export const groupDetail = (params, config = {}) =>
  http.post("group_purchase/detail", params, config);
//拼团规格数量
export const groupSpecNum = (params, config = {}) =>
  http.post("group_purchase/gg_num", params, config);
//拼团规格列表
export const groupSpecList = (params, config = {}) =>
  http.post("group_purchase/gg_lists", params, config);
//立即拼团
export const groupLjList = (params, config = {}) =>
  http.post("group_purchase/lj_list", params, config);
//立即拼团-查看全部
export const groupAllList = (params, config = {}) =>
  http.post("group_purchase/lj_list_all", params, config);
//待成团
export const groupWaitList = (params, config = {}) =>
  http.post("group_purchase/my_group_purchase1", params, config);
//已成团
export const groupSuccList = (params, config = {}) =>
  http.post("group_purchase/my_group_purchase2", params, config);
//邀请页面
export const groupInvitation = (params, config = {}) =>
  http.post("group_purchase/invitation", params, config);
//拼团时间
export const getGroupTime = (params, config = {}) =>
  http.post("group_purchase/dhs", params, config);
//创建拼团
export const createGroup = (params, config = {}) =>
  http.post("group_purchase/create", params, config);
//参与拼团
export const joinGroup = (params, config = {}) =>
  http.post("group_purchase/join", params, config);



// 选择定位
export const indexAddress = (data) => http.get("common/area", data);
//下单页面
export const goodsOrder = (params, config = {}) =>
  http.post("goods/order", params, config);
export const payGoods = (params, config = {}) =>
  http.post("pay/pay", params, config); // 商品支付
export const payReserve = (params, config = {}) =>
  http.post("pay/reserve", params, config); // 商品预约
export const payReserve_wk = (params, config = {}) =>
  http.post("pay/pay_reserve", params, config); // 商品预约尾款

// 预约时间日历
export const makeTime = (data) => http.get("common/pay_calendar", data);
//文件上传
export const upload = (params, config = {}) =>
  http.post("common/upload", params, config); // 商品预约尾款



// 地址
export const addressDefault = (data) =>
  http.get("common/address_default", data); //默认地址
export const addressList = (data) => http.get("common/address_list", data); //全部地址
export const addressAdd = (params, config = {}) =>
  http.post("common/address_add", params, config); //添加地址
export const addressEdit = (params, config = {}) =>
  http.post("common/address_edit", params, config); //修改地址
export const addressDel = (params, config = {}) =>
  http.post("common/address_del", params, config); //删除地址



// 订单
export const orderList = (params, config = {}) =>
  http.post("order/list", params, config);
export const comboTime = (params, config = {}) =>
  http.post("order/add_combo_time", params, config);
export const cancelOrder = (params, config = {}) =>
  http.post("order/cancel_order", params, config); //取消订单
export const orderDetail = (params, config = {}) =>
  http.post("order/detail", params, config); //取消详情
//通过订单直接下单
export const payByOrder = (params, config = {}) =>
  http.post("pay/order_id_pay", params, config);
// 订单反馈
export const addFeedback = (params, config = {}) =>
  http.post("order/add_feedback", params, config);
//售后
export const saleAfter = (params, config = {}) =>
  http.post("order/aftermarket", params, config);
//我的售后
export const mineSaleAfter = (params, config = {}) =>
  http.post("order/aftermarket_list", params, config);

//在线招聘
export const jobOnline = (params, config = {}) =>
  http.post("job/list", params, config);
//报名
export const signUp = (params, config = {}) =>
  http.post("job/sign_up", params, config);
//招聘详情
export const jobDetail = (params, config = {}) =>
  http.post("job/detail", params, config);



// 搜索
export const searchLike = (data) => http.get("common/search_like", data);
export const search = (params, config = {}) =>
  http.post("common/search", params, config);

// 常见问题
export const goodsQuestion = (params, config = {}) =>
  http.post("goods/question", params, config); //商品问题
export const question = (data) => http.get("common/question", data);

// 个人中心-意见反馈
// export const personalCenter = (data) =>
//   http.get("common/personal_center", data);
export const feedback = (data) =>
  http.post("common/feedback", data);